package org.xukai.scala

import org.apache.spark.ml.classification.DecisionTreeClassificationModel
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.mllib.classification.LogisticRegressionModel
import org.apache.spark.mllib.tree.model.DecisionTreeModel

/**
  * @desc
  * @author lf
  * @date 2018-10-10-19:24
  */
object ModelAnly {

  def main(args: Array[String]): Unit = {
//    System.setProperty("hadoop.home.dir", "D:\\data\\winutils-master\\hadoop-2.7.1")
//    println(System.getProperty("hadoop.home.dir"))
    val scconf = new SparkConf().setAppName("CustomSort").setMaster("local[2]")
    val sc = new SparkContext(scconf)


    var model = DecisionTreeModel.load(sc, "D:/tmp/model/DecisionTreeClassifier")
    model.asInstanceOf[DecisionTreeClassificationModel]

  }

}
